<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <canvas id="canvas" width="400" height="400"></canvas>
    <script src="utils.js"></script>
    <script>
        var canvas = document.getElementById('canvas'),
            mouse = utils.captureMouse(canvas)
        canvas.addEventListener('mousedown', function(){
            console.log(mouse.x, mouse.y)
        })
        
    </script>

</body>
</html>